package com.mysoft.gfyx.marketdevelop.controller;

import com.mysoft.framework.modeling.dataapi.DataApi;
import com.mysoft.framework.mvc.api.Controller;
import com.mysoft.framework.rpc.annotation.PubAction;
import com.mysoft.framework.rpc.annotation.PubService;
import com.mysoft.framework.rpc.contants.RequestPrefix;
import com.mysoft.gfyx.marketdevelop.controller.dto.GetRecommendSearchTemplateDetailResponseDto;
import com.mysoft.gfyx.marketdevelop.controller.dto.GetRecommendSearchTemplateResponseDto;
import com.mysoft.gfyx.marketdevelop.service.RecommendSearchTemplateService;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.RequestMethod;
import javax.annotation.Resource;
import java.util.UUID;

/**
 * 推荐筛选模板
 */
@PubService(value = "/recommendSearchTemplateDataApi", prefix = RequestPrefix.API)
@Tag(name = "推荐筛选模板-API")
public class RecommendSearchTemplateDataApiController extends Controller implements DataApi {
    @Resource
    private RecommendSearchTemplateService recommendSearchTemplateService;

    //获取推荐筛选模板+分类
    @PubAction(value = "/getRecommendSearchTemplate", method = RequestMethod.POST)
    public GetRecommendSearchTemplateResponseDto getRecommendSearchTemplate() {
        return recommendSearchTemplateService.getRecommendSearchTemplate();
    }
    //获取推荐筛选模板详情
    @PubAction(value = "/getRecommendSearchTemplateDetail", method = RequestMethod.POST)
    public GetRecommendSearchTemplateDetailResponseDto getRecommendSearchTemplateDetail(UUID recommendSearchTemplateGUID) {
        return recommendSearchTemplateService.getRecommendSearchTemplateDetail(recommendSearchTemplateGUID);
    }
}
